//@ts-nocheck
function onSdkReady() {
    dapi.getScreenSize();
    dapi.getAudioVolume();
    dapi.addEventListener("audioVolumeChange", function () {
 
    });

    //dapi.removeEventListener("ready", ondapiReady);
    dapi.addEventListener('viewableChange', function (viewable) {
        if (viewable) {
            //script.startMyGame();
        }
        else {
            cc.log("暂停游戏");
        }
    });


    // if (dapi.isViewable()) {
    //     script.startMyGame();
    // }
}

export function init() {
    console.log("ironsource 初始化");
    if (dapi.isReady()) {
        onSdkReady();
    }
    else {
        dapi.addEventListener("ready", function()
        {
            onSdkReady();
        });
    }
}



export function openStoreUrl() {
    //ironsource 要求调这个。。
    dapi.openStoreUrl();
}

